package com.neutech.service.impl;
import com.neutech.mapper.DoctorMapper;
import com.neutech.service.DoctorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
public  class DoctorServiceImpl implements DoctorService {
    @Autowired
    private DoctorMapper doctorMapper;
    @Override
    public List<Map<String, Object>> queryDoctor() {
        List<Map<String, Object>> list = doctorMapper.queryDoctorList(0);
        return list;
    }
    @Override
    public void insertDoctor(Map map){
        Integer a = doctorMapper.addDoctor(map);

    }
    public void updataDoctor(Map map){
        doctorMapper.updataDoctorById(map);
    }
    @Override
    public void deleteDoctor(Map map){
       // doctorMapper.delDoctorById(map);
//        System.out.println(map.get("docid"));
//        System.out.println("kanzheli");
        Integer docid= Integer.valueOf(map.get("docid").toString());
        doctorMapper.delDoctorById(docid);
    }
}
